package com.msy.mai.launch.web.entity.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

import static com.msy.mai.common.core.constants.UserConstants.*;

/**
 * @author Wang
 * @version 1.0
 * @Date 2024/10/27 下午2:37
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(title = "密码登录认证体", description = "密码登录认证体")
public class PasswordLoginBody extends LoginBody{

    @NotBlank(message = "用户名不得为空")
    @Length(min = USERNAME_MIN_LENGTH, max = USERNAME_MAX_LENGTH, message = "用户名格式有误")
    @Schema(description = "用户名")
    private String username;

    @NotBlank(message = "密码不得为空")
    @Length(min = PASSWORD_MIN_LENGTH,max = PASSWORD_MAX_LENGTH, message = "密码格式有误")
    @Schema(description = "密码")
    private String password;

}
